package vashion.azeroth.back.controller.tran;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import vashion.azeroth.core.personal.tran.pojo.PersonalReturnGoodsOrder;
import vashion.azeroth.core.result.ApiResult;
import vashion.azeroth.core.service.tran.PersonalReturnGoodsOrderService;

@Controller
@RequestMapping("/back/tran")
public class ReturnGoodsOrderController {
	
	@Autowired
	private PersonalReturnGoodsOrderService<PersonalReturnGoodsOrder> returnGoodsOrderService;
	
    @RequestMapping("getReturnGoodsOrderList.htm")
    @ResponseBody
    public ApiResult<List<PersonalReturnGoodsOrder>> getReturnGoodsOrderList(@ModelAttribute("PersonalReturnGoodsOrder") PersonalReturnGoodsOrder returnGoodsOrder) {

        return returnGoodsOrderService.getReturnGoodsOrderList(returnGoodsOrder);
    }
    
    @RequestMapping("agreeReturnGoods.htm")
    @ResponseBody
    public ApiResult<Boolean> agreeReturnGoods(@ModelAttribute("PersonalReturnGoodsOrder") PersonalReturnGoodsOrder returnGoodsOrder) {

    	
        return returnGoodsOrderService.modifyReturnGoodsOrder(returnGoodsOrder);
    }
}
